class Solution:
  def work(self, n):
    res = 0
    i = 1       # 循环控制临时变量
    while i * i <= n:
      res += n // i
      i += 1
    cur = n // i
    while cur >= 1:
      cur_bottom = (n // (cur + 1)) + 1
      cur_top = n // cur
      res += (cur_top - cur_bottom + 1) * cur
      cur -= 1
    return res % 998244353


if __name__ == "__main__":
    solution = Solution()
    print(solution.work(10000000000000))